﻿using System;

namespace Headspring.Training.Core.Model
{
	public class Manager : Employee
	{
		public Manager(string userName, string firstName, string lastName,
		               string emailAddress, Secretary secretary) :
		               	base(userName, firstName, lastName, emailAddress)
		{
			Secretary = secretary;
		}

		public Manager()
		{
		}

		public virtual Secretary Secretary { get; set; }

		public override string GetRejectEmail(DayOfWeek dayOfWeek)
		{
			if (Secretary != null)
			{
				return Secretary.GetRejectEmail(dayOfWeek);
			}
			return base.GetRejectEmail(dayOfWeek);
		}
	}
}